From ff5009bc0e3278a636a74c6f067a9a3ac1c161da Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Fri, 18 Sep 2009 08:28:52 +0100 Subject: [PATCH] AMD IOMMU: If interrupt remapping is disabled, then do not update interrupt remapping table with IOAPIC write. Signed-off-by: Wei Wang --- xen/drivers/passthrough/amd/iommu_intr.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/xen/drivers/passthrough/amd/iommu_intr.c b/xen/drivers/passthrough/amd/iommu_intr.c index 00afa1cec6..c5b35ece4c 100644 --- a/xen/drivers/passthrough/amd/iommu_intr.c +++ b/xen/drivers/passthrough/amd/iommu_intr.c @@ -192,6 +192,9 @@ void amd_iommu_ioapic_update_ire( *IO_APIC_BASE(apic) = reg; *(IO_APIC_BASE(apic)+4) = value; + if ( !iommu_intremap ) + return; + /* get device id of ioapic devices */ bdf = ioapic_bdf[IO_APIC_ID(apic)]; iommu = find_iommu_for_device(bdf); @@ -281,6 +284,9 @@ void amd_iommu_msi_msg_update_ire( struct pci_dev *pdev = msi_desc->dev; struct amd_iommu *iommu = NULL; + if ( !iommu_intremap ) + return; + iommu = find_iommu_for_device((pdev->bus << 8) | pdev->devfn); if ( !iommu ) -- 2.30.2